package com.island.dao;


import java.util.List;

import org.springframework.stereotype.Repository;

import com.island.model.Admin;
import com.pollexsoft.base.dao.BaseHibernateDao;


@Repository
public class TestDao  extends  BaseHibernateDao<Admin, java.lang.String> {
	
	
	public List<Admin> find(){
		String hqlString="from Admin";
		return find(hqlString, new Object[]{});
			
	}	
	
	public void inserAdmin(Admin admin){
		insert(admin);	
	}
	
	public void deleteAdmin(int id){
		String hqlString="delete from Admin where loginid=?";
		delete(hqlString, id);
	}
	
	public void updateAdmin(Admin admin){
		String hqlString="update Admin set  loginpassword=? where loginid=?";
		update(hqlString, new Object[]{admin.getLoginpassword(),admin.getLoginid()});	
	}

}
